package com.bcxj.apipassenger.Service;

import com.bcxj.apipassenger.remote.ServiceOrderClient;
import com.bcxj.internalcommon.constant.IdentityConstant;
import com.bcxj.internalcommon.dto.OrderRequest;
import com.bcxj.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: OrderService
 * Package: com.bcxj.apipassenger.Service
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/11/9 18:05
 * @Version 1.0
 * @Since 1.0
 */
@Service
public class OrderInfoService {

    @Autowired
    private ServiceOrderClient serviceOrderClient;

    public ResponseResult add(OrderRequest orderRequest) {
        return serviceOrderClient.add(orderRequest);
    }


    /**
     * 乘客取消订单
     */
    public ResponseResult cancel(String orderId) {
        return serviceOrderClient.cancel(orderId, IdentityConstant.PASSENGER_IDENTITY);
    }
}
